package com.itheima.dubbo.api;

import com.itheima.domain.db.QuestionsCategory;
import com.itheima.dubbo.mapper.QuestionsCategoryMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author 阿鹏
 * @date 2021/3/1 20:57
 */
@Service
public class QuestionsCategoryApiImpl implements QuestionsCategoryApi {

    @Autowired
    private QuestionsCategoryMapper categoryMapper;
    @Override
    public List<QuestionsCategory> findAll() {
        return categoryMapper.selectList(null);
    }

    @Override
    public QuestionsCategory queryCategoryById(Long cid) {
        return categoryMapper.selectById(cid);
    }
}
